-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type annotations, checked with MyPy #366
Conversation
I think that this behavior made more sense in the Python 2 days, but now it's just a hazard.
2836f28
to
0a49042
Compare
This is necessary on Python 3.7 because type is not subscriptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, and gets us to a place where we can start actually fixing things type-wise; please feel free to fix the CI configuration issues (do feel free to drop 3.7 but let's get rid of the broken alpha for now) and land.
Also if you're feeling reciprocal I could really use some reviews on: |
There are tons of unions of concrete types in the APIs because treq does tons of
isinstance()
checks internally. It's pretty gross.This targets Python 3.8 for MyPy to match what Twisted uses, so the 3.7 build is busted.
Fixes #302.